<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/web/commons/global.jsp"%>

<div class="book-main">
	<div class="book-main-table">
		<div class="title-wrapper">
			<div class="search-wrapper">
				<div class="input-group input-group-sm">
					<input type="text" class="form-control" id="bookKeywordsInput"
						placeholder="请输入经名关键字搜索" value="${param.bKeywords }" /> <span
						class="input-group-btn"> <a class="btn btn-default"
						type="button" id="bookKeywordsBtn"><i class="icon-search"></i></a>
					</span>
				</div>
			</div>
			<b><i class="icon-book"></i>&nbsp;佛经 </b>
			<div class="title-tips-wrapper">
				<ul class="ul-li-horizontal">
					<li><a href="${baseUrl }/write/dedicate-merits-list.html">查看回向</a></li>
					<li><a href="javaScript:;" onclick="showMerits()">抄经的功德</a></li>
					<li><a href="javaScript:;" onclick="showAttention()">抄经注意事项</a></li>
				</ul>
			</div>
			<div class="clear-both"></div>
		</div>
		<!-- 								<div class="vertical-spacing-5"></div> -->
		<table class="table table-striped table-hover">
			<tr>
				<td>经名</td>
				<!-- 										<td>类型</td> -->
				<td>总字数</td>
				<td>总抄写次数</td>
				<td></td>
			</tr>
			<c:forEach items="${chapters }" var="_chapter">
				<tr>
					<td><a href="${baseUrl }/book/chapter/${_chapter.id}.html"
						target="_blank">${_chapter.title }</a></td>
					<td>${_chapter.contentTextLength }</td>
					<td>${_chapter.statistics.countWrite }</td>
					<td
						style="background-color: rgba(230, 223, 207, 1); color: rgba(145, 113, 74, 1);"><i
						class="icon-pencil"></i> &nbsp; <a
						href="${baseUrl }/write/${_chapter.id }.html"> 开始抄经</a></td>
				</tr>
			</c:forEach>

		</table>
	</div>
</div>

<!-- 							<div class="vertical-spacing-10"></div> -->
<div class="book-pagination-wrapper">
	<div class="content">
		<ul class="pagination page-ul">

			<c:if test="${pagination.index > 1}">
				<li class="page-item"><a href="javascript:;"
					onclick="getBookList(${pagination.index - 1})">&laquo;</a></li>
				<li class="page-item"><a href="javascript:;"
					onclick="getBookList(1)">首页</a></li>
			</c:if>

			<c:forEach begin="${pagination.index }" end="${pagination.index + 7}"
				varStatus="pageStatus">
				<c:if test="${pageStatus.index <= pagination.pages}">
					<c:choose>
						<c:when test="${pageStatus.first }">
							<li class="page-item cur-page"><a href="javascript:;">${pageStatus.index
																}</a></li>
						</c:when>
						<c:otherwise>
							<li class="page-item"><a href="javascript:;"
								onclick="getBookList(${pageStatus.index })">${pageStatus.index
																}</a></li>
						</c:otherwise>
					</c:choose>
				</c:if>
			</c:forEach>

			<c:if test="${pagination.index < pagination.pages}">
				<li class="page-item" onclick="getBookList(${pagination.index + 1})"><a
					href="javascript:;">&raquo;</a></li>
				<li class="page-item" onclick="getBookList(${pagination.pages} )"><a
					href="javascript:;">尾页</a></li>
			</c:if>

			<!-- 													<li class="page-item has-more"><a href="javascript:;">&hellip;</a></li> -->
		</ul>
	</div>
</div>

